package com.example.demo.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/")
public class IndexController {

    @ResponseBody
    @RequestMapping("/index")
    public String index(){

        return "aaa";
    }

    @RequestMapping(value="/test", produces = "text/html")
    public ModelAndView test(){

        return new ModelAndView("test");
    }
}
